<%--
  Created by IntelliJ IDEA.
  User: yfuxzpskbr
  Date: 2021/4/30
  Time: 19:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="database.MySQLUtils"%>
<%@page import="beans.User" %>
<%@ page import="java.sql.Statement" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人注册</title>
    <link rel="stylesheet" href="register2.css?v=<%=System.currentTimeMillis()%>">
    <link rel="icon" type="image/x-icon" href="res/favicon.ico"/>
    <script>
        function login() {
            alert("点击了去购物");
        }

        // window.onload = function () {
        //     alert(username);
        //     document.getElementById("text") = username;
        // }
        var name = "zhangshan";
    </script>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    response.setContentType("text/html;charset=UTF-8");
%>
<div class="header">
    <div class="img">
        欢迎注册
    </div>
    <div class="tologin">
        已有账号? <a href="login.jsp">请登录></a>
    </div>
</div>
<div class="body">
    <div class="box">
        <div class="top">
            <div class="bbox selected">
                <div class="cir cir_">
                    √
                </div>
                验证手机号
            </div>
            <div class="bbox selected" style="margin-left: 62px;">
                <div class="cir cir_">
                    √
                </div>
                填写账号信息
            </div>
            <div class="bbox selected" style="float: right;">
                <div class="cir cir_">
                    √
                </div>
                注册成功
            </div>
            <div style="position: absolute;top:8px;left:65px;width: 124px;height: 10px;background-image: url(./res/diandianlv.png);"></div>
            <div style="position: absolute;top:8px;left:230px;width: 124px;height: 10px;background-image: url(./res/diandianlv.png);"></div>
        </div>
        <div class="message">
            <div style="width: 64px;height: 64px;margin:0px auto;margin-top:50px;"><img src="./res/clock.png"></div>
            <div id="text"
                 style="color:darkcyan;margin-top:5px;height: 30px;font-size:28px;line-height: 30px; text-align:center;">
                恭喜您<%=request.getParameter("username")%>
            </div>
            <div style="margin-top:10px;height: 24px;line-height: 24px;font-size: 14px;color:#63a070;text-align: center;">
                您已经注册成为京东用户,祝您购物愉快
            </div>
        </div>
        <div class="button" id="button3">
            <button onclick="location.href='./login.jsp'">去登录</button>
        </div>
    </div>
</div>
<div class="footer">
    <div class="ftext">
        <ul>
            <li><a href="#" style="border: none;">关于我们</a></li>
            <li><a href="#">联系我们</a></li>
            <li><a href="#">人才招聘</a></li>
            <li><a href="#">商家入驻</a></li>
            <li><a href="#">广告服务</a></li>
            <li><a href="#">手机京东</a></li>
            <li><a href="#">友情链接</a></li>
            <li><a href="#">销售联盟</a></li>
            <li><a href="#">京东社区</a></li>
            <li><a href="#">京东公益</a></li>
            <li><a href="#">English Site</a></li>
        </ul>
        <br>
        <span style="font-size:12px;color:#999;margin-left:400px;">Copyright©2004-2021  京东JD.com 版权所有</span>
    </div>
</div>
<div class="line"></div>

<%
    final String mobile = (String)session.getAttribute("mobile");
    final String username = request.getParameter("username");
    final String password = request.getParameter("password");

    //写入数据库
    MySQLUtils.insert(mobile,username,password);
%>
</body>
</html>
